package com.akuhome.resource.dao;

import com.akuhome.resource.DO.report.*;
import com.akuhome.resource.dto.report.DepartmentStatisticInfo;
import com.akuhome.resource.dto.report.YearTrainInfo;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Repository
public interface ReportDao {
    List<DepartmentStatistic> findAllDepartmentStatisticByDateMonth(Date date);

    List<DepartmentStatistic> findAllDepartmentStatisticByYearReportId(Integer yearReportId);

    List<TrainStatistic> findAllTrainStatisticByPartAndMonthReportId(String part,Integer monthReportId);

    List<TrainStatistic> findAllTrainStatisticByMonthReportId(Integer monthReportId);

    Date findDateByMonthReportId(Integer monthReportId);

    Date findYearByYearReportId(Integer yearReportId);

    YearReport findYearReportByYear(Date year);

    MonthReport findMonthReportByMonth(Date date);

    List<MonthReportStatistic> findAllMonthReportStatisticByDateYear(Date date);

    List<DepartmentStatisticInfo> findDepartmentStatisticInfoByYearReportIdAndPart(String part, Integer yearReportId);

    void insertMonthReport(MonthReport monthReport);

    void insertDepartmentStatistic(List<DepartmentStatistic> list);

    void insertTrainStatistic(List<TrainStatistic> list);

    void insertYearReport(YearReport yearReport);

    void insertMonthReportStatistic(List<MonthReportStatistic> list);

    void updateMonthReportYearId(Integer yearReportId,Date year);
}
